/**
 * 
 */
package me.myachievements.web;

import me.myachievements.persistence.account.Account;

import org.apache.wicket.Request;
import org.apache.wicket.Session;
import org.apache.wicket.protocol.http.WebSession;

/**
 * @author besseym
 *
 */
public class MyAchievementsSession extends WebSession {
	
	private Account account;
	
	public static MyAchievementsSession get(){
		return (MyAchievementsSession) Session.get();
	}

	/**
	 * @param request
	 */
	public MyAchievementsSession(Request request) {
		super(request);
	}
	
	/**
	 * @return if account has been authenticated
	 */
	public boolean isAuthenticated(){
		return (account != null);
	}

	/**
	 * @return the account
	 */
	public Account getAccount() {
		return account;
	}

	/**
	 * @param account the account to set
	 */
	public void setAccount(Account account) {
		this.account = account;
	}

}
